<?php

namespace app\store\validate;

use think\Validate;

class CategoryValidate extends Validate
{
    protected $rule = [
        // 'sort' => 'require|integer|egt:0',
        'name' => 'require|max:255',
        'status' => 'require|in:1,2',
        'icon' =>'require'
    ];


    protected $message = [
         
        'name.require' => '请输入分类名称',
        // 'sort.require' => '请输入商品详情!',
        'icon.require' => '请上传图标',
        'status.in' => '无效的状态值!',
    ];
 
    protected $scene = [
        'add' => ['name', 'status', 'icon']
    ];
}